home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 273_01 / rightstr.cc < prev    next >
Encoding:
Text File  |  1987-09-26  |  363 b   |  13 lines

  1. right_str(int x, char *str, char *new_str)
  2. /* This will take the right x number of character from the string pointed
  3.    to by *str and place them into the string pointed to by *new_str.
  4. */
  5. {
  6.         str=str + strlen(str) - x;
  7.         while(*str) {
  8.                 *new_str=*str;  
  9.                 new_str++; str++;
  10.         }
  11.         *new_str=0x00;
  12. }
  13.